namespace EyeOpen.Warehouse.Mvc.ViewModel.Controllers
{
	using System.Web.Mvc;

	public abstract class BaseController : Controller
	{
		protected ActionResult Render(string viewName, object model = null)
		{
			if ((this.Request == null) || this.Request.IsAjaxRequest())
			{
				return model == null ? this.PartialView(viewName) : this.PartialView(viewName, model);
			}

			return model == null ? this.View(viewName) : this.View(viewName, model);
		}
	}
}